#!/usr/bin/node

const log = console.log;
      argv = process.argv;
  //    argv = process.argv[2];
// log(`arguments count:${argv.length}`);
// log(`arguments:`);
// log(argv);


 // log(`${argv} = ${`eval(argv)}`);


      try{
        if(argv.length === 2 || argv[2] == "--help" || argv[2] == "-h"){

            console.log("usage: cmd-name [OPTION] [expression]\nevaluate the expression.\n\nMandatory arguments to long options are mandatory for short options too.\n-h, --help output help information and exit"
                      )
        } else{
            console.log(argv[2] + "=" + eval(argv[2]));       

        }

      }catch(e){
        log(`${argv} 是非法字符串`);
      }
